﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/Admin.master" AutoEventWireup="true"
    CodeFile="AddSongAlbum.aspx.cs" Inherits="Admin_Default2" %>

<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder1" runat="Server">
    <div class="top-bar select-bar">
        <a href="AddSongLink.aspx" class="button">Add Song</a>
        <h1>
            <b>Add Song Album</b></h1>
        <asp:Label ID="lblmsg" Font-Bold="true" Width="100%" runat="server" BackColor="Red"
            ForeColor="White" EnableTheming="False"></asp:Label>
    </div>
    <br />
    <div>
        <table width="150%" cellpadding="3px">
            <tr>
                <td>
                    <asp:Label ID="lblSelectCategory" Font-Bold="true"  runat="server" Text="Select Category: "></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlCategory" runat="server" Width="90%"  AutoPostBack="True" OnSelectedIndexChanged="ddlCategory_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
                <td>
                    <asp:Label ID="lblSubCategory" Font-Bold="true" runat="server" Text="Select Sub Category: "></asp:Label>
                </td>
                <td>
                    <asp:DropDownList ID="ddlSubCategory" runat="server" Width="60%"  AutoPostBack="true" OnSelectedIndexChanged="ddlSubCategory_SelectedIndexChanged">
                    </asp:DropDownList>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblAlbumName" Font-Bold="true" runat="server" Text="Album Name: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtAlbumName" runat="server" Width="80%"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblAlbumYear" Font-Bold="true" runat="server" Text="Album Year: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtAlbumYear" runat="server" Width="50%"></asp:TextBox>
                </td>
            </tr>
            <tr>
                <td>
                    <asp:Label ID="lblAlbumOwner" Font-Bold="true" runat="server" Text="Owner: "></asp:Label>
                </td>
                <td>
                    <asp:TextBox ID="txtAlbumOwner" runat="server" Width="80%"></asp:TextBox>
                </td>
                <td>
                    <asp:Label ID="lblAlbumCover" Font-Bold="true" runat="server" Text="Album Cover: "></asp:Label>
                </td>
                <td>
                    <asp:FileUpload ID="FileUploadAlbumCover" runat="server" />
                </td>
            </tr>
            <tr>
               
                <td align="right" colspan="4">
                    <asp:Button ID="btnAddAlbum" Font-Bold="true" Width="15%" OnClientClick="return ValidateAddSongAlbum('ddlCategory','ddlSubCategory','txtAlbumName','txtAlbumYear','FileUploadAlbumCover','txtAlbumOwner')"
                        Text="Add" runat="server" OnClick="btnAddAlbum_Click" />
                </td>
            </tr>
        </table>
    </div>
    <br />
    <div>
        <asp:GridView ID="grdAlbum" runat="server" AutoGenerateColumns="false" ShowHeader="true"
            Width="100%">
            <Columns>
                <asp:TemplateField HeaderText="ID">
                    <ItemTemplate>
                        <asp:Label ID="lblAlbumID" ForeColor="Black" Font-Bold="true" Text='<%# DataBinder.Eval(Container.DataItem,"AlbumID")%>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Album Cover">
                    <ItemTemplate>
                        <asp:Image ID="imgAlbumCover" runat="server" Width="25px" Height="25px" ImageUrl='<%# DataBinder.Eval(Container.DataItem,"AlbumCoverPath")%>' />
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:TemplateField HeaderText="Album Name">
                    <ItemTemplate>
                        <asp:Label ID="lblAlbumName" ForeColor="Black" Font-Bold="true" Text='<%# DataBinder.Eval(Container.DataItem,"AlbumName")%>'
                            runat="server"></asp:Label>
                    </ItemTemplate>
                </asp:TemplateField>
                <asp:CommandField ShowEditButton="True" EditImageUrl="~/Admin/img/edit-icon.gif"
                    ButtonType="Image" />
            </Columns>
            <AlternatingRowStyle BackColor="ButtonShadow" />
            <HeaderStyle BackColor="SpringGreen" />
        </asp:GridView>
    </div>
</asp:Content>
